<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ElementPlus AST渲染引擎修复版</title>
    <link rel="stylesheet" href="dist/index.css">
    <style>
        :root {
            --primary-color: #409EFF;
            --sidebar-bg: #304156;
            --sidebar-text: #bfcbd9;
            --sidebar-active: #409EFF;
            --header-height: 60px;
            --sidebar-width: 220px;
            --border-color: #DCDFE6;
            --bg-color: #f5f7fa;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
        }
        
        body {
            background-color: var(--bg-color);
            color: #212529;
            height: 100vh;
            overflow: hidden;
        }
        
        #app {
            display: flex;
            flex-direction: column;
            height: 100vh;
        }
        
        .app-header {
            background-color: white;
            padding: 12px 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            z-index: 100;
        }
        
        .header-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 18px;
            color: #303133;
        }
        
        .header-title i {
            color: var(--primary-color);
        }
        
        .app-container {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        
        .editor-panel {
            width: 300px;
            background-color: white;
            border-right: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .panel-title {
            padding: 16px;
            font-size: 15px;
            font-weight: 600;
            color: #606266;
            border-bottom: 1px solid var(--border-color);
        }
        
        .json-editor {
            flex: 1;
            padding: 15px;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.5;
            white-space: pre;
            border: none;
            outline: none;
            resize: none;
        }
        
        .preview-panel {
            flex: 1;
            padding: 20px;
            overflow: auto;
            background-color: var(--bg-color);
        }
        
        .preview-container {
            background-color: white;
            border-radius: 4px;
            box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
            min-height: calc(100vh - 140px);
            padding: 25px;
        }
        
        .empty-preview {
            text-align: center;
            padding: 40px;
            color: #909399;
        }
        
        .empty-preview i {
            font-size: 48px;
            margin-bottom: 15px;
            color: #dcdfe6;
        }
        
        .toolbar {
            padding: 15px;
            border-top: 1px solid var(--border-color);
            display: flex;
            gap: 10px;
        }
        
        .btn {
            padding: 8px 15px;
            border-radius: 4px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.2s;
        }
        
        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }
        
        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--border-color);
            color: #606266;
        }
        
        .btn:hover {
            filter: brightness(0.95);
            transform: translateY(-1px);
        }
        
        .btn:active {
            transform: translateY(0);
        }
    </style>
</head>
<body>
     <div id="dragElement" draggable="true">拖我</div>
<div id="dropArea">放置区</div>

<script>
  const dragEl = document.getElementById('dragElement');
  const dropZone = document.getElementById('dropArea');

  dragEl.addEventListener('dragstart', (e) => {
    e.dataTransfer.setData('text/plain', e.target.id);
    e.target.style.opacity = '0.5';
  });

  dropZone.addEventListener('dragover', (e) => e.preventDefault());

  dropZone.addEventListener('dragenter', () => {
    dropZone.style.backgroundColor = '#e6f7ff';
  });

  dropZone.addEventListener('dragleave', () => {
    dropZone.style.backgroundColor = '';
  });

  dropZone.addEventListener('drop', (e) => {
    e.preventDefault();
    const id = e.dataTransfer.getData('text/plain');
    const draggable = document.getElementById(id);
    draggable.style.opacity = '1';
    e.target.appendChild(draggable);
    dropZone.style.backgroundColor = '';
  });
</script>
</body>
</html>